package com.xxxx;

import com.xxxx.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @program: yun2
 * @ClassName AdminUtils
 * @description:
 * @author: ZhouBin
 * @create: 2022-05-25 09:58
 * @Version 1.0
 **/
public class AdminUtils {
    public static Admin getAllAdmin(){
        return ((Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}
